Skip to main content

Directional Derivatives

Directional Derivatives

The directional derivative captures how a function changes as one moves in a specific direction. It's the rate of change of a function in the direction of a particular vector. Given a function ff and a unit vector u=[u1,u2,u3]\mathbf{u} = [u_1, u_2, u_3], the directional derivative of ff in the direction of u\mathbf{u} at a point (x,y,z)(x, y, z) is computed as:

Duf(x,y,z)=f(x,y,z)uD_\mathbf{u}f(x,y,z) = \nabla f(x,y,z) \cdot \mathbf{u}

where f\nabla f is the gradient of ff and \cdot represents the dot product.

To compute the directional derivative:

  1. Find the Gradient of ff The gradient of ff, f\nabla f, is a vector whose components are the partial derivatives of ff:
f(x,y,z)=[fx,fy,fz]\nabla f(x,y,z) = \left[ \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z} \right]
  1. Compute the Dot Product Take the dot product between the gradient of ff and the normalized direction vector u\mathbf{u}:
Duf(x,y,z)=f(x,y,z)uD_\mathbf{u}f(x,y,z) = \nabla f(x,y,z) \cdot \mathbf{u}

This value represents the rate of change of ff at the point (x,y,z)(x, y, z) in the direction of u\mathbf{u}.

Example

Consider the function f(x,y,z)=x2+y2+z2f(x,y,z) = x^2 + y^2 + z^2. To compute the directional derivative at a point (a,b,c)(a,b,c) in the direction of u=[u1,u2,u3]\mathbf{u} = [u_1, u_2, u_3]:

  1. Find the gradient:

    f(a,b,c)=[2a,2b,2c]\nabla f(a,b,c) = [2a, 2b, 2c]
  2. Normalize u\mathbf{u} if not already a unit vector.

  3. Compute the dot product:

    Duf(a,b,c)=[2a,2b,2c][u1,u2,u3]=2au1+2bu2+2cu3D_\mathbf{u}f(a,b,c) = [2a, 2b, 2c] \cdot [u_1, u_2, u_3] = 2au_1 + 2bu_2 + 2cu_3

This is the rate of change of ff at (a,b,c)(a,b,c) in the direction of u\mathbf{u}.

Directional Derivatives: Definition

The directional derivative of a function f:RnRf: \mathbb{R}^n \rightarrow \mathbb{R} at a point xRn\mathbf{x} \in \mathbb{R}^n in the direction of a unit vector uRn\mathbf{u} \in \mathbb{R}^n is defined as the rate at which ff changes at x\mathbf{x} when moving in the direction u\mathbf{u}. Formally, the directional derivative Duf(x)D_{\mathbf{u}}f(\mathbf{x}) is defined as:

Duf(x)=f(x)uD_{\mathbf{u}}f(\mathbf{x}) = \nabla f(\mathbf{x}) \cdot \mathbf{u}

where \cdot denotes the dot product.

Connection to Gradient

The gradient f(x)\nabla f(\mathbf{x}) is particularly useful for computing directional derivatives. In fact, the gradient vector points in the direction in which ff increases most rapidly, and its magnitude gives the rate of that increase. Therefore, the directional derivative in the direction of the gradient is the maximum directional derivative, and it is equal to the magnitude of the gradient:

maxu=1Duf(x)=f(x)\max_{\| \mathbf{u} \| = 1} D_{\mathbf{u}}f(\mathbf{x}) = \| \nabla f(\mathbf{x}) \|

Geometrical Interpretation

You can geometrically interpret the directional derivative as the projection of the gradient vector onto the direction vector u\mathbf{u}. When u\mathbf{u} is aligned with f(x)\nabla f(\mathbf{x}), the directional derivative reaches its maximum value, which is f(x)\| \nabla f(\mathbf{x}) \|.

Potential Figure

A useful figure could display the gradient vector f(x)\nabla f(\mathbf{x}) at a point x\mathbf{x} on a contour map of f(x,y)f(x, y). Additionally, several other unit vectors ui\mathbf{u}_i could originate from the same point x\mathbf{x}. Projections of f(x)\nabla f(\mathbf{x}) onto these unit vectors would illustrate the concept of directional derivatives. The length of each projection would indicate the value of the directional derivative Duif(x)D_{\mathbf{u}_i}f(\mathbf{x}) in that specific direction.

  1. Normalize the Direction Vector Before using the direction vector u\mathbf{u}, ensure it's a unit vector. If it's not, normalize it:
u=uu\mathbf{u} = \frac{\mathbf{u}}{|\mathbf{u}|}

where u|\mathbf{u}| is the magnitude of u\mathbf{u}.